package com.gxan.dao.system;

import com.gxan.pojo.*;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public interface SystemDao {
    /**
     * common
     * dept_address
     * dept_father
     * dept_full_name
     * dept_short_name
     * remark
     * start
     */
    //添加部门表（组织结构）
    public int addDepartment(String dept_full_name, String dept_short_name, String dept_father, String dept_address, String common, String remark, Integer start) throws SQLException;
    //查询用户表所有用户信息
    public List<SysUser> selectUSerAll(Integer page, Integer pageSize) throws SQLException;
//    查询用户表用户数
    public Integer selectUserCount() throws SQLException;
    //查询部门表中所有组织全称
    public String[] selectDeptFullName();
    //通过用户名称，用户角色，所属部门查询用户信息
    public List<SysUser> selectUserByNameRoleDep(String name, String role, String department);
    //通过部门名查部门id
    public int selectDepartByName(String name) throws SQLException;
    //新增用户
    public int addUser(String login_name, Integer password, String role, Integer dept_id, Integer phone) throws SQLException;

    //修改用户信息
    public int updateUser(Integer user_id, String login_name, String role, Integer dept_id, String phone) throws SQLException;

    int delUserById(Integer id) throws SQLException;

    List<SysUser> selectByNameRoleDepartment(String login_user, String role, String dept_name, Integer param01, Integer param02) throws SQLException;

    public Integer selectCountByNameRoleDepartment(String login_name, String role, String dept_name, Integer param01, Integer param02) throws SQLException ;



    public List<SysDept> selectAllDeptname() throws SQLException;

    public Integer addPosition(String job_name, String job_type, Integer dept_id, String description, String remark, Integer status) throws SQLException;

    List<SysJob> selectAllPosition(Integer param01, Integer param02) throws SQLException;

    Integer selectPositionCount() throws SQLException;

    int deletePositionById(int id) throws SQLException;

    int updatePositionById(Integer job_id, String job_name, String job_type, Integer dept_id, String description, String remark, Integer status) throws SQLException;

    Integer selectCountPositionByNameDepartmentStart(String job_name, String dept_name, Integer status, Integer param01, Integer param02) throws SQLException;

    List<SysJob> selectPositionByNameDepartmentStart(String job_name, String dept_name, Integer status, Integer param01, Integer param02) throws SQLException;

    int addJobtitle(String job_title_name, int sysDepts, String description, String remark, Integer status) throws SQLException;

    Integer selectJobtitleCount() throws SQLException;

    List<SysJobTitle> selectJobtitleAll(Integer param01, Integer param02) throws SQLException;

    int deleteJobtitleById(int id) throws SQLException;

    int updateJobtitleById(Integer job_title_id, String job_title_name, Integer sysDepts, String description, String remark, Integer status) throws SQLException;

    Integer selectCountJobtitleByNameDepartmentStatus(String job_title_name, String dept_name, Integer status, Integer param01, Integer param02) throws SQLException;

    List<SysJobTitle> selectJobtitleByNameDepartmentStatus(String job_title_name, String dept_name, Integer status, Integer param01, Integer param02) throws SQLException;

    int addTest(String test_title, String test_type, Integer sysDepts, String test_level, String test_setter, Date date, String test_content, String remark, String test_url, Integer status) throws SQLException;

    Integer selectTestCount() throws SQLException;

    List<Test> selectTestAll(Integer param01, Integer param02) throws SQLException;

    int updateTestById(Integer test_id, String test_title, String test_type, Integer dept_id, String test_level, String test_setter, Date date, String test_content, String remark, String test_url, Integer status) throws SQLException;

    int deleteTestById(int id) throws SQLException;

    Integer selectTestCountByTitleTypeDepartmentStart(String test_title, String test_type, String dept_name, Integer status, Integer param01, Integer param02) throws SQLException;

    List<Test> selectTestByTitleTypeDepartmentStart(String test_title, String test_type, String dept_name, Integer status, Integer param01, Integer param02) throws SQLException;
}
